<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class PostContent_model extends CI_Model
{
	function __construct()
	{
		parent::__construct();
		$this->load->database();//加载数据库
	}

	public function insert($data)
	{
		return $this->db->insert('post_content', $data);
	}

	public function update($post_id, $content)
	{
		return $this->db->where('post_id', $post_id)->update('post_content', $content);
	}

	/**
	 * 删除
	 */
	public function del($id)
	{
		return $this->db->delete('post_content', array('id' => $id));
	}
}
